# We use nasm instead of GNU as

SOURCES=boot.o main.o common.o monitor.o printk.o descriptor_tables.o gdt.o interrupt.o isr.o clock.o paging.o

CFLAGS= -g -nostdlib -nostdinc -fno-builtin -fno-stack-protector
LDFLAGS=-Tlink.ld
ASFLAGS=-felf

all: $(SOURCES) link

clean:
	-rm *.o

link:
	ld $(LDFLAGS) -o kernel $(SOURCES)
	
.s.o:
	nasm $(ASFLAGS) $<
